package com.bosch.in.rtp1.ept.util;

import java.sql.Connection;

import com.bosch.in.rtp1.ept.dao.ActiveHoldDiagramDao;
import com.bosch.in.rtp1.ept.dao.AuthenticationDao;
import com.bosch.in.rtp1.ept.dao.DurationColorConDao;
import com.bosch.in.rtp1.ept.dao.FXFactorDao;
import com.bosch.in.rtp1.ept.dao.FinishRecipeDao;
import com.bosch.in.rtp1.ept.dao.FrozenColumnDao;
import com.bosch.in.rtp1.ept.dao.HldDurByMonDiagramDao;
import com.bosch.in.rtp1.ept.dao.HoldCodeFilterDao;
import com.bosch.in.rtp1.ept.dao.LinkListDao;
import com.bosch.in.rtp1.ept.dao.LotStatusDao;
import com.bosch.in.rtp1.ept.dao.RelHldDiagramDao;
import com.bosch.in.rtp1.ept.dao.ReleasedHoldDao;
import com.bosch.in.rtp1.ept.dao.SkpFshRcpConDao;
import com.bosch.in.rtp1.ept.dao.impl.ActiveHoldDiagramJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.AuthenticationJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.DurationColorConJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.FXFactorJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.FinishRecipeJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.FrozenColumnJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.HldDurByMonDiagramJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.HoldCodeFilterJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.LinkListJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.LotStatusJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.RelHldDiagramJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.ReleasedHoldJDBCDao;
import com.bosch.in.rtp1.ept.dao.impl.SkpFshRcpConJDBCDao;

/**
 * Loose coupling manager layer with dao layer, act as DAO provider.
 * @author TPR1HC
 *
 */
public class DaoFactory {
	/**
	 * Eager initialization
	 */
	private static DaoFactory factory = new DaoFactory();
	/**
	 * Hidden constructor, prevent explicit initialization
	 */
	private DaoFactory(){}
	/**
	 * Factory method to get the instace of this class
	 * @return
	 */
	public static DaoFactory getInstance() {
		return factory;
	}
	/**
	 * Create new instance of LotStatusDao class 
	 * @return LotStatusDao object
	 */
	public LotStatusDao getLotStatusDao(Connection con) {
		return new LotStatusJDBCDao(con);
	}
	
	/**
	 * Create new instance of HoldCodeFilterDao class 
	 * @return HoldCodeFilterDao object
	 */
	public HoldCodeFilterDao getHoldCodeFilterDao(Connection con) {
		return new HoldCodeFilterJDBCDao(con);
	}
	
	/**
	 * Create new instance of FXFactorDao class 
	 * @return FXFactorDao object
	 */
	public FXFactorDao getFXFactorDao(Connection con) {
		return new FXFactorJDBCDao(con);
	}
	
	/**
	 * Create new instance of FinishRecipeDao class 
	 * @return FinishRecipeDao object
	 */
	public FinishRecipeDao getFinishRecipeDao(Connection con) {
		return new FinishRecipeJDBCDao(con);
	}
	
	/**
	 * Create new instance of SkpFshRcpDao class 
	 * @return SkpFshRcpConDao object
	 */
	public SkpFshRcpConDao getSkpFshRcpConDao(Connection con) {
		return new SkpFshRcpConJDBCDao(con);
	}
	
	/**
	 * Create new instance of RelHldDiagramDao class 
	 * @return RelHldDiagramDao object
	 */
	public RelHldDiagramDao getRelHldDiagramDao(Connection con)
	{
		return new RelHldDiagramJDBCDao(con);
	}
	
	/**
	 * Create new instance of ActiveHoldDiagramDao class 
	 * @return ActiveHoldDiagramDao object
	 */
	public ActiveHoldDiagramDao getActiveHoldDiagramDao(Connection con)
	{
		return new ActiveHoldDiagramJDBCDao(con);
	}
	
	/**
	 * Create new instance of RelHldDiagramDao class 
	 * @return RelHldDiagramDao object
	 */
	public HldDurByMonDiagramDao getHldDurByMonthDao(Connection con)
	{
		return new HldDurByMonDiagramJDBCDao(con);
	}
	
	/**
	 * Create new instance of FrozenColumnDao class 
	 * @return FrozenColumnDao object
	 */
	public FrozenColumnDao getFrozenColumnDao(Connection con) {
		return new FrozenColumnJDBCDao(con);
	}
	
	/**
	 * Create new instance of ReleasedHoldDao class 
	 * @return ReleasedHoldDao object
	 */
	public ReleasedHoldDao getReleasedHoldDao(Connection con) {
		return new ReleasedHoldJDBCDao(con);
	}
	
	/**
	 * Create new instance of DurationColorConDao class 
	 * @return DurationColorConDao object
	 */
	public DurationColorConDao getDurColorDao(Connection con) {
		return new DurationColorConJDBCDao(con);
	}
	
	/**
	 * Create new instance of AuthenticationDao class 
	 * @return AuthenticationDao object
	 */
	public AuthenticationDao getAuthenticationDao(Connection con) {
		return new AuthenticationJDBCDao(con);
	}
	
	/**
	 * Create new instance of LinkListDao class 
	 * @return LinkListDao object
	 */
	public LinkListDao getLinkListDao(Connection con) {
		return new LinkListJDBCDao(con);
	}
}
